package com.jiutong.service.impl;

import com.jiutong.dao.UserDao;
import com.jiutong.dao.jiutongUser.UserMapper;
import com.jiutong.pojo.Product;
import com.jiutong.pojo.User;
import com.jiutong.service.ProductService;
import com.jiutong.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by sty on 2017/2/22.
 */
@Service
public class UserServiceImpl implements UserService {
//    @Resource
//    private UserDao userDao;

    @Resource
    private UserMapper userMapper;
    @Transactional
    public int saveUser(User user){
        int update  = userMapper.save(user.getUid(),user.getChineseName());
//        if(1==1) throw new RuntimeException("test ex");
        return update;
    }
}
